<?php


namespace app\api\model;


class Cart extends BaseModel
{
    public static function getAll($user_id, $page, $size)
    {
        return self::where(['user_id'=>$user_id])->order('create_time desc')
            ->paginate($size, true, ['page' => $page]);
    }

    public static function getRawAll($user_id)
    {
        return self::where(['user_id'=>$user_id])->order('create_time desc')->select();
    }
}